home *** CD-ROM | disk | FTP | other *** search
/ Ham Radio 2000 #2 / Ham Radio 2000 - Volume 2.iso / HAMV2 / FAX_SSTV / VESTER_M / QUAD.BAS (.txt) < prev    next >
Encoding:
GW-BASIC  |  1996-06-06  |  15.0 KB  |  358 lines

  1. 10  CLEAR,32768:KEY OFF:CLS
  2. 15  GOTO 2000
  3. 20  KEY 10,"system"+CHR$(13):KEY 5,"LIST 2000-2200"+CHR$(13)
  4. 25  KEY 4,"SAVE "+CHR$(34)+"QUAD":KEY 6,"rcv"+CHR$(13):KEY 9,"txmit"+CHR$(13)
  5. 30  DEF SEG=&H5F00
  6. 40  BLOAD "quada.asm",&H100
  7. 50  PRINT:PRINT:PRINT"                          QUAD PICTURE"
  8. 60  PRINT:PRINT"   This program is for creating a single file picture from four other"
  9. 70  PRINT"pictures which are of the same mode. Most typically it will be used with"
  10. 80  PRINT"the full width files like Scottie and Martin 1 and the AVT modes. The nar-"
  11. 90  PRINT"rower Scottie and Martin 2 are already of marginal resolution, so further"
  12. 100  PRINT"shrinking doesn't make sense. The DR$ in the SYSTEM CONFIGURATION (key F5)"
  13. 110  PRINT"will typically be a RAMDRIVE like 'd'. Default path for file locations is"
  14. 120  PRINT"specified in line 2084 of the  SYS CONFIG (hit F5 twice now). To Transmit"
  15. 130  PRINT"directly from this program, exit with Q and select F9 to proceed."
  16. 132  PRINT:PRINT"   You can add to the Path choice any file name constraints. For example"
  17. 133  PRINT"if you have a series of Don pixes in c:\tmp which are DON1, DON2, ...,DON13"
  18. 134  PRINT"etc., then the Path can be answered    c:\tmp\don  . If S1 mode is chosen"
  19. 135  PRINT"all files DON*.S1 are displayed. When asked for the file names, you only"
  20. 136  PRINT"have to fill in the *; ie, 3, 1, 13, and jim (one pix was named DONJIM)."
  21. 137  PRINT"If you answer a non-existent file name, the pix screen will come up blank"
  22. 138  PRINT"so you hit Q(uit) to exit and then choose F2 to try again."
  23. 140  PRINT:PRINT"   All filenames below will have their suffix added by the program."
  24. 150  PRINT:PRINT"     -----F5 to SYS CONFIG-----F10 to DOS----"
  25. 160  INPUT"    Path for files to be combined (Default=DF$)";PA$
  26. 170  IF PA$="" THEN PA$=DF$
  27. 180  IF PA$="system" THEN SYSTEM
  28. 190  IF PA$="LIST 2000-2200" THEN CLS:GOTO 1170
  29. 200  PRINT:PRINT:PRINT"    What Mode are Files to be combined? (3) Scottie 1 (4)Scottie 2 "
  30. 210  INPUT"    (5)AVT90 (6)AVT94 (7)Martin 1 (77)Martin 2 (8)Wraase 96";I
  31. 220  IF I=3 THEN MO$=".s1"
  32. 221  IF I=4 THEN MO$=".s2"
  33. 222  IF I=5 THEN MO$=".90"
  34. 223  IF I=6 THEN MO$=".94"
  35. 224  IF I=7 THEN MO$=".m1"
  36. 225  IF I=77 THEN MO$=".m2"
  37. 226  IF I=8 THEN MO$=".96"
  38. 230  FILES PA$+"*"+MO$
  39. 235  PRINT:PRINT"    Program will add suffix to names"
  40. 240  INPUT"    Filename of first file (default=A)";A$
  41. 250  IF A$="" THEN A$="a"
  42. 270  PRINT:INPUT"    Filename of second file (Default=B)";B$
  43. 275  IF B$="" THEN B$="b"
  44. 280  PRINT:INPUT"    Filename of third file (Default =C)";C$
  45. 290  IF C$="" THEN C$="c"
  46. 310  PRINT:INPUT"    Filename of fourth file (Default=D)";D$
  47. 320  IF D$="" THEN D$="d"
  48. 330  PRINT:PRINT:PRINT"    Path/Filename for Output file (Default=a.p)"
  49. 335  INPUT"    You must pick Default a.p to Transmit directly now.";E$
  50. 340  IF E$="" THEN E$="a.p":DF=1
  51. 500  IF I=3 THEN MO$=".s1":LL=878:L=288:L%=240:GOTO 570
  52. 510  IF I=4 THEN MO$=".s2":LL=568:L=184:L%=240:GOTO 570
  53. 520  IF I=5 THEN MO$=".90":LL=768:L=256:L%=240:GOTO 570
  54. 530  IF I=6 THEN MO$=".94":LL=960:L=320:L%=200:GOTO 570
  55. 540  IF I=7 THEN MO$=".m1":LL=915:L=302:L%=240:GOTO 570
  56. 545  IF I=77 THEN MO$=".m2":LL=464:L=152:L%=240:GOTO 570
  57. 550  IF I=8 THEN MO$=".96":LL=745:L=248:L%=240:GOTO 570
  58. 560  GOTO 200
  59. 570  A$=PA$+A$+MO$:B$=PA$+B$+MO$:C$=PA$+C$+MO$:D$=PA$+D$+MO$
  60. 580  IF DF=1 THEN GOTO 610
  61. 590  E$=PA$+E$+MO$
  62. 610  LLB=INT(LL/256):LLA=LL-256*LLB:POKE &H1F0,LLA:POKE &H1F1,LLB:POKE &H261,LLA:POKE &H262,LLB
  63. 620  JL=LL+1:JLB=INT(JL/256):JLA=JL-256*JLB:POKE &H1F8,JLA:POKE &H1F9,JLB
  64. 630  LB=INT (L/256):LA=L-256*LB:POKE &H257,LA:POKE &H258,LB:POKE &H2DE,LA:POKE &H2DF,LB:POKE &H309,LA:POKE &H30A,LB
  65. 635  IF I=3 OR I=4 THEN POKE &H1A9,233:POKE &H1AA,60:POKE &H1AB,1:POKE &H245,2:POKE &H259,233:POKE &H25A,187:POKE &H25B,0
  66. 640  ZL=2*LL:ZLB=INT(ZL/256):ZLA=ZL-256*ZLB:POKE &H220,ZLA:POKE &H221,ZLB:POKE &H234,ZLA:POKE &H235,ZLB:POKE &H2CF,ZLA:POKE &H2D0,ZLB
  67. 645  HL=INT(L/2):HLB=INT(HL/256):HLA=HL-256*HLB:POKE &H250,HLA:POKE &H251,HLB:POKE &H2C3,HLA:POKE &H2C4,HLB:POKE &H32F,HLA:POKE &H330,HLB:POKE &H340,HLA:POKE &H341,HLB
  68. 650  L2=L%/2:LB%=INT(L2/256):LA%=L2-256*LB%:POKE &H215,LA%:POKE &H216,LB%
  69. 655  EA=LL-3*L+1:EA2=INT(EA/256):EA1=EA-256*EA2:POKE &H325,EA1:POKE &H326,EA2:POKE &H321,EA1:POKE &H322,EA2
  70. 660  K=&H100:CALL K(E$,D$,C$,B$,A$)
  71. 670  A$=E$:DEF SEG=&H4F00
  72. 671  IF TC=1 THEN GOTO 4420
  73. 675  IF I=96 THEN L=546:LL=1638:P=536:GOTO 1910
  74. 700  BLOAD "vu64ba.asm",&H100
  75. 720  IF I=3 THEN L=288
  76. 730  IF I=3 THEN L=288
  77. 740  IF I=4 THEN L=184
  78. 750  IF I=5 THEN L=256
  79. 760  IF I=6 THEN L=320
  80. 770  IF I=7 THEN GOTO 1180
  81. 780  IF I=77 THEN GOTO 1180
  82. 790  IF I=8 THEN L=248
  83. 800  POKE &H226,2  'No. poked here=pixels scrolled per left arrow depression
  84. 810  POKE &H427,PT
  85. 820  IF I=9 THEN GOTO 1360
  86. 830  P=L-PT:P2=INT(P/256):P1=P-P2*256
  87. 840  POKE &H15D,P1:POKE &H15E,P2:POKE &H45B,P1:POKE &H45C,P2
  88. 850  IF I=4 THEN POKE &H3EA,16:LL=568
  89. 860  IF I=5 THEN POKE &H3EA,0:LL=768
  90. 870  IF I=7 THEN POKE &H3EA,9:LL=915
  91. 880  IF I=77 THEN POKE &H3EA,8:LL=464
  92. 890  IF I=8 THEN POKE &H3EA,1:LL=745
  93. 900  IF I=6 THEN POKE &H3EA,0:LL=960
  94. 910  IF I=3 THEN POKE &H3EA,14:LL=878
  95. 920  IF EX=0 THEN GOTO 960
  96. 930      'next two lines put in expand by 2 for modes desired
  97. 940  IF I=4 THEN P=320:POKE &H43B,235:POKE &H43C,27:POKE &H15A,0:POKE &H15B,2
  98. 950  IF I=77 THEN P=2*P:POKE &H43B,235:POKE &H43C,27:POKE &H15A,0:POKE &H15B,2
  99. 960  OF=(640-2*P)/2:OF2=INT(OF/256):OF1=OF-256*OF2:POKE &H13B,OF1:POKE &H13C,OF2
  100. 970  LL2=INT(LL/256):LL1=LL-256*LL2:POKE &H1FD,LL1:POKE &H1FE,LL2:POKE &H242,LL1:POKE &H243,LL2
  101. 980  IF V=1 THEN GOTO 1020
  102. 990  VC=0:PRINT:PRINT:PRINT"  Is Video Card (1)Trident mode 5D (2)Tseng mode 2E (3)ATI mode 62"
  103. 1000  INPUT"(4)Paradise mode 5F (5)Chips&Tech mode 79 (6)Genoa mode 5C (7)VESA (Default=1)";VC
  104. 1010  IF VC=0 THEN VC=1       'default choice
  105. 1020  IF VC=1 THEN GOTO 1540
  106. 1030  IF VC=2 THEN GOTO 1100
  107. 1040  IF VC=3 THEN GOTO 1560
  108. 1050  IF VC=4 THEN GOTO 1630
  109. 1060  IF VC=5 THEN GOTO 1700
  110. 1070  IF VC=6 THEN GOTO 1760
  111. 1080  IF VC=7 THEN GOTO 1840
  112. 1090  GOTO 990
  113. 1100  POKE &H113,46:POKE &H142,205:POKE &H144,136:POKE &H145,216:POKE &H146,238:POKE &H147,195
  114. 1110  K=&H100
  115. 1120  IF I=99 THEN CALL K(C%,S%,A$):GOTO 1140
  116. 1130  CALL K(S%,A$)
  117. 1135  KEY 4,"save"+CHR$(13)
  118. 1140  PRINT:PRINT:INPUT" Choices (F2)Re-RUN (F4)SAVE (F5)CONFIG (F6)RCV (F9)TXMIT (F10)DOS (Def=BASIC)";Z$
  119. 1141  IF Z$="" THEN GOTO 1170
  120. 1145  IF Z$="RUN" THEN LOAD "quad.bas",R
  121. 1148  IF Z$="save" THEN GOTO 1255
  122. 1150  IF Z$="LIST 2000-2200" THEN GOTO 1170
  123. 1155  IF Z$="system" THEN SYSTEM
  124. 1156  IF Z$="rcv" THEN LOAD"rt.bas",R
  125. 1160  IF Z$="txmit" THEN GOTO 1220
  126. 1165  GOTO 1140
  127. 1170  CLS:PRINT"        ----F2 to Re-RUN----F10 to DOS----F5 to SYS CONFIG----":KEY 9,"files"+CHR$(34):KEY 4,"SAVE"+CHR$(34)+"QUAD":END
  128. 1180  POKE &H180,128:POKE &H3DA,128:POKE &H3CB,64:POKE &H3BC,192
  129. 1190  IF I=77 THEN L=152:GOTO 800
  130. 1200  L=302:GOTO 800
  131. 1210  L=282
  132. 1220  DEF SEG=&H5F00:POKE &HFFFF,I
  133. 1221  LOAD"alchvt.bas",R
  134. 1250  PRINT:PRINT:INPUT"   Do you want to save last picture-y or n (Default=n)";P$
  135. 1251  IF P$="" THEN P$="n"
  136. 1252  IF P$="n" THEN GOTO 1140
  137. 1253  IF P$="y" THEN GOTO 1255
  138. 1254  GOTO 1250
  139. 1255  OF$=E$
  140. 1260  PRINT:PRINT:PRINT OF$:PRINT:PRINT:INPUT"   Save it in compressed format--y or n (Default=n)";F$
  141. 1261  IF F$="" THEN F$="n"
  142. 1262  IF F$="n" THEN GOTO 1270
  143. 1263  IF F$="y" THEN GOTO 1270
  144. 1264  GOTO 1260
  145. 1270  DEF SEG=&H4F00
  146. 1280  BLOAD "savepix.asm",&H100
  147. 1300  PI=512:PO=512:K%=0:L%=0
  148. 1310  POKE &H192,LL1:POKE &H193,LL2:POKE &H1B9,LL1:POKE &H1BA,LL2
  149. 1320  BY=3*L-1:BYB=INT(BY/256):BYA=BY-256*BYB:POKE &H20D,BYA:POKE &H20E,BYB
  150. 1330  IF S%<0 THEN S!=65536+S% ELSE S!=S%
  151. 1340  S2=INT(S!/256):S1=S!-256*S2:POKE &H163,S1:POKE &H164,S2
  152. 1360  PRINT:PRINT:PRINT"   The program will add an appropiate Mode suffix.":PRINT
  153. 1370  IF F$="y" THEN INPUT"       What Name  for Picture (Default is DO NOT SAVE)";PIX$
  154. 1375  IF F$="n" THEN INPUT" What Path\Name for Full Format Pix (Default=DO NOT SAVE)";PIX$
  155. 1380  IF PIX$="" THEN GOTO 1140
  156. 1390  IF I=3 THEN MO$=".s1":LE%=410
  157. 1400  IF I=4 THEN MO$=".s2":LE%=300
  158. 1410  IF I=5 THEN MO$=".90":LE%=360
  159. 1420  IF I=66 THEN MO$=".188":LE%=640
  160. 1430  IF I=6 THEN MO$=".94":LE%=450
  161. 1440  IF I=9 THEN MO$=".fax":LE%=480
  162. 1450  IF I=96 THEN MO$=".cfx":LE%=1440
  163. 1460  IF I=7 THEN MO$=".m1":LE%=420
  164. 1470  IF I=77 THEN MO$=".m2":LE%=300
  165. 1480  IF I=8 THEN MO$=".96":LE%=300
  166. 1490  L2=INT(LE%/256):L1=LE%-256*L2:POKE &H18B,L1:POKE &H18C,L2
  167. 1500  PF$=PIX$+MO$
  168. 1505  IF F$="y" THEN PF$=DR$+":"+PF$
  169. 1510  K=&H100:CALL K(K%,L%,OF$,PF$)
  170. 1520  IF F$="n" THEN GOTO 1140
  171. 1522  IF F$="y"THEN PRINT:PRINT:INPUT"   What path/directory for compressed file";X$:GOTO 1524
  172. 1523  GOTO 1522
  173. 1524  SHELL "pk "+X$+" "+DR$+":"+" "+PIX$+" "+MO$
  174. 1525  GOTO 1140
  175. 1540  IF I=6 THEN POKE &H113,&H5C
  176. 1550  GOTO 1110
  177. 1560  POKE &H113,&H62:POKE &H444,192:POKE 321,235:POKE 322,90  'ATI video mode 62
  178. 1570  POKE 324,136:POKE 325,196
  179. 1580  POKE 326,128:POKE 327,228:POKE 328,225:POKE 329,208:POKE 330,227:POKE 331,8
  180. 1590  POKE 332,220:POKE 333,176:POKE 334,178:POKE 335,254:POKE 336,202:POKE 337,239:POKE 338,195
  181. 1600  IF I=99 THEN POKE &H16A,128:POKE &H16B,2:POKE &H155,224:POKE &H156,1:POKE 321,233:POKE 322,66:POKE 323,4:POKE &H58A,192
  182. 1610  IF I=6 THEN POKE &H113,&H61
  183. 1620  GOTO 1110
  184. 1630  POKE &H113,&H5F:POKE 321,186:POKE 322,206          'Paradise video mode 5f
  185. 1640  POKE 323,3:POKE 324,176:POKE 325,9:POKE 326,136:POKE 327,220:POKE 328,208
  186. 1650  POKE 329,228:POKE 330,208:POKE 331,228:POKE 332,208:POKE 333,228:POKE 334,208:POKE 335,228
  187. 1660  POKE 336,239:POKE 337,195
  188. 1670  IF I=99 THEN POKE &H16A,128:POKE &H16B,2:POKE &H155,224:POKE &H156,1
  189. 1680  'IF I=6 THEN POKE &H113,&H5E
  190. 1690  GOTO 1110
  191. 1700  POKE &H113,&H79:POKE 321,186:POKE 322,214            'Chips & Tech Mode 79
  192. 1710  POKE 323,3:POKE 324,176:POKE 325,16:POKE 326,136:POKE 327,220:POKE 328,177
  193. 1720  POKE 329,BS:POKE 330,210:POKE 331,228:POKE 332,239:POKE 333,195
  194. 1730  IF I=99 THEN POKE &H16A,128:POKE &H16B,2:POKE &H155,224:POKE &H156,1
  195. 1740  IF I=6 THEN POKE &H113,&H78
  196. 1750  GOTO 1110
  197. 1760  POKE &H113,&H5C:POKE 321,186:POKE 322,196                   'Genoa mode 5c
  198. 1770  POKE 323,3:POKE 324,176:POKE 325,6:POKE 326,238:POKE 327,66:POKE 328,236
  199. 1780  POKE 329,36:POKE 330,199:POKE 331,128:POKE 332,227:POKE 333,7:POKE 334,208
  200. 1790  POKE 335,227:POKE 336,208:POKE 337,227:POKE 338,208:POKE 339,227:POKE 340,8
  201. 1800  POKE 341,216:POKE 342,238:POKE 343,195
  202. 1810  IF I=99 THEN POKE &H16A,128:POKE &H16B,2:POKE &H155,224:POKE &H156,1
  203. 1820  IF I=6 THEN POKE &H113,&H7E
  204. 1830  GOTO 1110
  205. 1840  POKE &H111,79:POKE &H113,2:POKE 321,177                   'VESA mode 101
  206. 1850  POKE 322,BS:POKE 323,210:POKE 324,227:POKE 325,136:POKE 326,218
  207. 1860  POKE 327,48:POKE 328,246:POKE 329,184:POKE 330,5:POKE 331,79:POKE 332,49:POKE 333,219:POKE 334,205
  208. 1861  POKE 335,16:POKE 336,195
  209. 1870  IF S=1 THEN POKE &H44A,5:GOTO 1900
  210. 1880  IF I=99 THEN POKE &H16A,128:POKE &H16B,2:POKE &H155,224:POKE &H156,1
  211. 1890  'IF I=6 THEN POKE &H398,0
  212. 1900  GOTO 1110
  213. 1910  BLOAD "trusho.asm",&H100
  214. 1915  P2=INT(P/256):P1=P-256*P2:POKE &H3B0,P1:POKE &H3B1,P2:POKE &H46B,P1:POKE &H46C,P2
  215. 1920  OF=3*(640-P)/2:OF2=INT(OF/256):OF1=OF-256*OF2:POKE &H13C,OF1:POKE &H13D,OF2:POKE &H512,OF1:POKE &H513,OF2
  216. 1925  Z=2*L:ZB=INT(Z/256):ZA=Z-256*ZB:POKE &H3CA,ZA:POKE &H3CB,ZB
  217. 1930  W=2*L+32:WB=INT(W/256):WA=W-256*WB:POKE &H3A9,WA:POKE &H3AA,WB:POKE &H3E5,WA:POKE &H3E6,WB
  218. 1935  LB=INT(L/256):LA=L-256*LB:POKE &H3BC,LA:POKE &H3BD,LB:POKE &H3C3,LA:POKE &H3C4,LB
  219. 1940  U=3*L:UB=INT(U/256):UA=U-256*UB:POKE &H55F,UA:POKE &H560,UB:POKE &H531,UA:POKE &H532,UB
  220. 1945  POKE &H427,10:POKE &H226,2  'poke to &h226 is pixels per left arrow depress
  221. 1950  LL2=INT(LL/256):LL1=LL-256*LL2:POKE &H1FD,LL1:POKE &H1FE,LL2:POKE &H242,LL1:POKE &H243,LL2:POKE &H15D,LL1:POKE &H15E,LL2
  222. 1955  Q=BL-3*P:QB=INT(Q/256):QA=Q-256*QB:POKE &H3D6,QA:POKE &H3D7,QB
  223. 1960  POKE &H39A,233:POKE &H39B,107:POKE &H39C,253:POKE &H11A,0:POKE &H11B,0:POKE &H2B8,235:POKE &H2B9,6:POKE &H3AC,1:POKE &H3B4,1
  224. 1965  POKE &H3A2,224:POKE &H3A3,1
  225. 1970  GOTO 1840
  226. 2000     '                   SYSTEM CONFIGURATION
  227. 2010     'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
  228. 2020  V=1     'V=0 is manual video card choice---V=1 is automatic choice
  229. 2030  VC=7    'Video card 1=Trident 2=Tseng 3=ATI 4=Paradise 5=Chips 6=Genoa
  230. 2040          '7=VESA (VESA card or VESA driver.Pick BS below to get full pix).
  231. 2045  BS=0    'Bank shift for different VESA configurations-values from 0 to 6
  232. 2046  BL=1920 'Bytes/Line in TRUCOLOR modes--ATI=1920 and Diamond PRO=2048
  233. 2047  BP=3    'Bytes/Pixel-BP=2  65536 col-BP=3 16 mil color--BP=4 some 2Mb card
  234. 2050  DR$="d" 'RAMDRIVE designation letter
  235. 2080  PT=6    'Pixels trimmed from edge of picture
  236. 2084  DF$="c:\tv\"   'Default path for files to be Quaded
  237. 2090  EX=2    'S2 and M2 aspect-EX=0 2xHoriz/2xVert-EX=1 4xH/2xV-EX=2 2xH/1xV
  238. 2091  TC=1    'TC=0=256 color--TC=1=TRUCOLOR
  239. 2092  FR=2    'FR=1=full screen---FR=2=quarter screen
  240. 2100  GOTO 20
  241. 2110                            'INSTRUCTIONS
  242. 2120    'To change, move cursor and type over present value and ENTER. Then move
  243. 2130    'cursor into clear and hit F5 to check what you typed. To SAVE the change
  244. 2140    'hit F4 and ENTER. Otherwise hit F2 to reRUN with temporary change.
  245. 4000  IF I=6 THEN POKE &H113,&H5C
  246. 4010  GOTO 4390
  247. 4020  POKE &H113,&H62:POKE &H444,192:POKE 321,235:POKE 322,90  'ATI video mode 62
  248. 4030  POKE 324,136:POKE 325,196
  249. 4040  POKE 326,128:POKE 327,228:POKE 328,225:POKE 329,208:POKE 330,227:POKE 331,8
  250. 4050  POKE 332,220:POKE 333,176:POKE 334,178:POKE 335,254:POKE 336,202:POKE 337,239:POKE 338,195
  251. 4060  IF I=99 THEN POKE &H16A,128:POKE &H16B,2:POKE &H155,224:POKE &H156,1:POKE 321,233:POKE 322,66:POKE 323,4:POKE &H58A,192
  252. 4070  IF I=6 THEN POKE &H113,&H61
  253. 4080  GOTO 4390
  254. 4090  POKE &H113,&H72:POKE 321,186:POKE 322,206          'Paradise video mode 72
  255. 4100  POKE 323,3:POKE 324,176:POKE 325,9:POKE 326,136:POKE 327,220:POKE 328,208
  256. 4110  POKE 329,228:POKE 330,208:POKE 331,228:POKE 332,208:POKE 333,228:POKE 334,208:POKE 335,228
  257. 4120  POKE 336,239:POKE 337,195
  258. 4130  IF I=99 THEN POKE &H16A,128:POKE &H16B,2:POKE &H155,224:POKE &H156,1
  259. 4140  'IF I=6 THEN POKE &H113,&H5E
  260. 4150  GOTO 4390
  261. 4160  POKE &H113,&H79:POKE 321,186:POKE 322,214            'Chips & Tech Mode 79
  262. 4170  POKE 323,3:POKE 324,176:POKE 325,16:POKE 326,136:POKE 327,220:POKE 328,177
  263. 4180  POKE 329,BS:POKE 330,210:POKE 331,228:POKE 332,239:POKE 333,195
  264. 4190  IF I=99 THEN POKE &H16A,128:POKE &H16B,2:POKE &H155,224:POKE &H156,1
  265. 4200  IF I=6 THEN POKE &H113,&H78
  266. 4210  GOTO 4390
  267. 4220  POKE &H113,&H5C:POKE 321,186:POKE 322,196                   'Genoa mode 5c
  268. 4230  POKE 323,3:POKE 324,176:POKE 325,6:POKE 326,238:POKE 327,66:POKE 328,236
  269. 4240  POKE 329,36:POKE 330,199:POKE 331,128:POKE 332,227:POKE 333,7:POKE 334,208
  270. 4250  POKE 335,227:POKE 336,208:POKE 337,227:POKE 338,208:POKE 339,227:POKE 340,8
  271. 4260  POKE 341,216:POKE 342,238:POKE 343,195
  272. 4270  IF I=99 THEN POKE &H16A,128:POKE &H16B,2:POKE &H155,224:POKE &H156,1
  273. 4280  IF I=6 THEN POKE &H113,&H7E
  274. 4290  GOTO 4390
  275. 4300  POKE &H111,79:POKE &H113,2:POKE 321,177                   'VESA mode 101
  276. 4310  POKE 322,BS:POKE 323,210:POKE 324,227:POKE 325,136:POKE 326,218
  277. 4320  POKE 327,48:POKE 328,246:POKE 329,184:POKE 330,5:POKE 331,79:POKE 332,49:POKE 333,219:POKE 334,205
  278. 4330  POKE 335,16:POKE 336,195
  279. 4340  IF I=99 AND SI=1 THEN POKE &H44A,5:GOTO 4360
  280. 4350  IF I=99 THEN POKE &H16A,128:POKE &H16B,2:POKE &H155,224:POKE &H156,1
  281. 4360  'IF I=6 THEN POKE &H398,0
  282. 4370  GOTO 4390
  283. 4380  POKE &H113,46:POKE &H142,205:POKE &H144,136:POKE &H145,216:POKE &H146,238:POKE &H147,195
  284. 4390  K=&H100
  285. 4400  CALL K(S%,A$)
  286. 4405  IF I=3 OR I=4 THEN S%=S%-L
  287. 4410  GOTO 1135
  288. 4420  BLOAD "trushof.asm",&H100
  289. 4440  IF BP=2 THEN POKE &H17A,233:POKE &H17B,67:POKE &H17C,5:POKE &H18D,17:POKE &H398,17
  290. 4450  IF BP=4 THEN POKE &H3CC,235:POKE &H3CD,32:POKE &H5CB,235:POKE &H5CC,187
  291. 4460  IF I=3 THEN L=287
  292. 4470  IF I=4 THEN FR=1:L=184
  293. 4480  IF I=5 THEN L=256
  294. 4490  IF I=6 THEN L=320
  295. 4495  IF I=7 OR I=77 THEN POKE &H2D7,1:POKE &H341,2:POKE &H66C,1:POKE &H4D7,1:POKE &H4F3,2:POKE &H65D,1
  296. 4500  IF I=7 THEN L=302
  297. 4510  IF I=77 THEN FR=1:L=152
  298. 4520  IF I=8 THEN L=248
  299. 4530  IF I=96 THEN L=546:LL=1638:PT=10:POKE &H3AC,1:POKE &H3B4,1:POKE &H3A2,224:POKE &H3A3,1:FR=0
  300. 4540  U=BP*L:UB=INT(U/256):UA=U-256*UB:POKE &H55F,UA:POKE &H560,UB:POKE &H531,UA:POKE &H532,UB
  301. 4550  POKE &H226,2  'No. poked here=pixels scrolled per left arrow depression
  302. 4560  POKE &H427,PT
  303. 4570  FOR C=&HD00 TO &HD50
  304. 4580  POKE C,0:NEXT C
  305. 4590  P=L-PT:P2=INT(P/256):P1=P-P2*256
  306. 4600  POKE &H3B0,P1:POKE &H3B1,P2:POKE &H46B,P1:POKE &H46C,P2:POKE &H5CF,P1:POKE &H5D0,P2:POKE &H601,P1:POKE &H602,P2
  307. 4610  LB=INT(L/256):LA=L-256*LB:POKE &H3BC,LA:POKE &H3BD,LB:POKE &H3C3,LA:POKE &H3C4,LB:POKE &H5BB,LA:POKE &H5BC,LB:POKE &H5C2,LA:POKE &H5C3,LB
  308. 4620  IF I=96 THEN POKE &H2F6,LA:POKE &H2F7,LB:POKE &H303,LA:POKE &H304,LB
  309. 4630  IF I=96 THEN Q=BL-BP*P:GOTO 4650
  310. 4640  Q=BL-2*BP*P
  311. 4650  Z=2*L:ZB=INT(Z/256):ZA=Z-256*ZB:POKE &H3CA,ZA:POKE &H3CB,ZB:POKE &H5C9,ZA:POKE &H5CA,ZB
  312. 4660  W=2*L+32:WB=INT(W/256):WA=W-256*WB:POKE &H3A9,WA:POKE &H3AA,WB:POKE &H3E5,WA:POKE &H3E6,WB:POKE &H5FE,WA:POKE &H5FF,WB:POKE &H6B2,WA:POKE &H6B3,WB
  313. 4670  IF I=7 THEN GOTO 4700
  314. 4680  IF I=77 THEN GOTO 4700
  315. 4690  GOTO 4730
  316. 4700  WM=L+32:WMB=INT(WM/256):WMA=WM-256*WMB:POKE &H3A9,WMA:POKE &H3AA,WMB:POKE &H3E5,WMA:POKE &H3E6,WMB:POKE &H5FE,WMA:POKE &H5FF,WMB:POKE &H6B2,WMA:POKE &H6B3,WMB
  317. 4710  X=2*L:XB=INT(X/256):XA=X-256*XB:POKE &H3C3,XA:POKE &H3C4,XB:POKE &H3C2,199:POKE &H5C2,XA:POKE &H5C3,XB:POKE &H5C1,199
  318. 4720  POKE &H3CA,LA:POKE &H3CB,LB:POKE &H3C9,239:POKE &H5C9,LA:POKE &H5CA,LB:POKE &H5C8,239
  319. 4730  IF I=4 THEN LL=568
  320. 4740  IF I=5 THEN LL=768
  321. 4750  IF I=7 THEN LL=915
  322. 4760  IF I=77 THEN LL=464
  323. 4770  IF I=8 THEN LL=745
  324. 4780  IF I=6 THEN LL=960
  325. 4790  IF I=3 THEN LL=878
  326. 4800  IF I=96 THEN OF=BP*(640-P)/2:GOTO 4810
  327. 4805  OF=BP*(640-2*P)/2
  328. 4806  IF FR=2 THEN OF=20*BL+BP*INT((640-P)/2)
  329. 4810  OF2=INT(OF/256):OF1=OF-256*OF2:POKE &H13C,OF1:POKE &H13D,OF2:POKE &H512,OF1:POKE &H513,OF2
  330. 4820  LY=LL+1:LYB=INT(LY/256):LYA=LY-256*LYB:POKE &H697,LYA:POKE &H698,LYB
  331. 4830  LZ=2*LL:LZB=INT(LZ/256):LZA=LZ-256*LZB
  332. 4840  LL2=INT(LL/256):LL1=LL-256*LL2:POKE &H1FD,LL1:POKE &H1FE,LL2:POKE &H242,LL1:POKE &H243,LL2:POKE &H15D,LL1:POKE &H15E,LL2
  333. 4850  POKE &H638,LL1:POKE &H639,LL2:POKE &H5AC,LL1:POKE &H5AD,LL2
  334. 4860  IF I=96 THEN GOTO 4940
  335. 4870  IF FR=1 THEN POKE &H3AB,233:POKE &H3AC,32:POKE &H3AD,2:POKE &H15D,LZA:POKE &H15E,LZB:GOTO 4940
  336. 4880  POKE &H2F1,33:POKE &H2F2,2:POKE &H3AC,1:POKE &H3B4,1:Q=BL-BP*P
  337. 4890  IF I=3 OR I=4 THEN POKE &H1AE,LA:POKE &H1AF,LB:POKE &H3C2,199:POKE &H3C9,239:POKE &H5C1,199:POKE &H5C8,239
  338. 4900  IF I=3 THEN POKE &H3C3,79:POKE &H3C4,2:POKE &H3CA,48:POKE &H3CB,1:POKE &H5C2,79:POKE &H5C3,2:POKE &H5C9,48:POKE &H5CA,1:POKE &H2B7,0:POKE &H2B3,0
  339. 4910  IF I=3 THEN POKE &H3A9,63:POKE &H3AA,1:POKE &H5FE,63:POKE &H5FF,1
  340. 4920  IF I=4 THEN POKE &H3C3,128:POKE &H3C4,1:POKE &H5C2,128:POKE &H5C3,1:POKE &H3CA,200:POKE &H3CB,0:POKE &H5C9,200:POKE &H5CA,0:POKE &H2B7,0:POKE &H2B3,0
  341. 4930  IF I=4 THEN POKE &H3A9,216:POKE &H3AA,0:POKE &H5FE,216:POKE &H5FF,0
  342. 4940  IF EX=0 OR EX=2 THEN GOTO 4990
  343. 4950  IF FR>1 THEN GOTO 4990
  344. 4960    'next two lines expand S2 and M2 modes by 4 horizontally
  345. 4970  IF I=4 THEN P=160:Q=BL-4*BP*P:POKE &H5CF,P:POKE &H5D0,0:POKE &H601,P:POKE &H602,0:POKE &H13C,0:POKE &H13D,0:POKE &H5D3,2:POKE &H605,2
  346. 4980  IF I=77 THEN Q=BL-4*BP*P:BPO=34*BP:POKE &H3B4,4:POKE &H13C,BPO:POKE &H13D,0:POKE &H512,BPO:POKE &H513,0:POKE &H5D3,2:POKE &H605,2
  347. 4990  QB=INT(Q/256):QA=Q-256*QB:POKE &H3D6,QA:POKE &H3D7,QB:POKE &H5F1,QA:POKE &H5F2,QB:POKE &H6A5,QA:POKE &H6A6,QB
  348. 5000  POKE &H39A,233:POKE &H39B,107:POKE &H39C,253:POKE &H11A,0:POKE &H11B,0:POKE &H2B8,235:POKE &H2B9,6
  349. 5010  IF EX=2 AND I=4 THEN POKE &H600,235:POKE &H601,35
  350. 5020  IF EX=2 AND I=77 THEN POKE &H600,235:POKE &H601,35
  351. 5030  IF VC=1 THEN GOTO 4000
  352. 5040  IF VC=2 THEN GOTO 4380
  353. 5050  IF VC=3 THEN GOTO 4020
  354. 5060  IF VC=4 THEN GOTO 4090
  355. 5070  IF VC=5 THEN GOTO 4160
  356. 5080  IF VC=6 THEN GOTO 4220
  357. 5090  IF VC=7 THEN GOTO 4300
  358.